SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtFamiliaAlumno
AS
SELECT     dbo.tb_Familia.idFamilia AS ID, dbo.tb_TiposDeDocumento.Descripcion, dbo.tb_Familia.Documento, dbo.tb_Familia.Apellido, dbo.tb_Familia.Nombres, 
                      dbo.tb_Familia.Domicilio, dbo.tb_Nacionalidad.Descripcion AS Nacionalidad, dbo.tb_Ocupaciones.Descripcion AS Ocupacion, 
                      dbo.tb_Localidades.localidad, dbo.tb_NivelEstudios.Descripcion AS Estudios, dbo.tb_Familia.ACargo, dbo.tb_Familia.EsTutor, dbo.tb_Familia.Telefono, 
                      dbo.tb_Familia.Vive, dbo.tb_Familia.TelefonoDeUrgencia, dbo.tb_Familia.FechaDeNacimiento, dbo.tb_Familia.CUIL, dbo.tb_Familia.Sexo
FROM         dbo.tb_Familia INNER JOIN
                      dbo.tb_TiposDeDocumento ON dbo.tb_Familia.TipoDocumento = dbo.tb_TiposDeDocumento.idTipoDocumento INNER JOIN
                      dbo.tb_NivelEstudios ON dbo.tb_Familia.Estudios = dbo.tb_NivelEstudios.idNivelEstudio LEFT OUTER JOIN
                      dbo.tb_Ocupaciones ON dbo.tb_Familia.Ocupacion = dbo.tb_Ocupaciones.idOcupacion LEFT OUTER JOIN
                      dbo.tb_Localidades ON dbo.tb_Familia.Localidad = dbo.tb_Localidades.idLocalidad LEFT OUTER JOIN
                      dbo.tb_Nacionalidad ON dbo.tb_Familia.Nacionalidad = dbo.tb_Nacionalidad.idNacionalidad
GO
GRANT SELECT ON  [dbo].[vwtFamiliaAlumno] TO [Alumnos]
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1[50] 2[25] 3) )"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1 [56] 4 [18] 2))"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "tb_Familia"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 343
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 6
         End
         Begin Table = "tb_TiposDeDocumento"
            Begin Extent = 
               Top = 6
               Left = 265
               Bottom = 114
               Right = 491
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_NivelEstudios"
            Begin Extent = 
               Top = 6
               Left = 529
               Bottom = 84
               Right = 718
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Ocupaciones"
            Begin Extent = 
               Top = 6
               Left = 756
               Bottom = 84
               Right = 945
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Localidades"
            Begin Extent = 
               Top = 6
               Left = 983
               Bottom = 114
               Right = 1172
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Nacionalidad"
            Begin Extent = 
               Top = 84
               Left = 529
               Bottom = 162
               Right = 718
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      RowHeights = 220
   End
   Begin CriteriaPane = 
      ', 'USER', N'dbo', 'VIEW', N'vwtFamiliaAlumno', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'USER', N'dbo', 'VIEW', N'vwtFamiliaAlumno', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'USER', N'dbo', 'VIEW', N'vwtFamiliaAlumno', NULL, NULL
GO
